/**
 * @name    ObjectExtend
 * @author  GinKo.Wang
 * @mail    <a href='mailTo:yingosen@gmaiil.com'>GinKo.Wang</a>
 * @date    2015-11-27 15:25
 *
 */
(function (window) {
    var ObjectExtend = function () {
    };
    ObjectExtend.prototype = {
        extend: function (objects) {
            var _target = {};
            var len = objects.length;
            if (len == 0) {
                return _target;
            }
            var _prototype ;
            for (var i = 0; i < len; i++) {
                var _item = objects[i];
                if (typeof(_item) !== "object") {
                    continue;
                }
                for(_prototype in _item){
                    _target[_prototype] = _item[_prototype];
                }
            }
            return _target;
        }
    };
    var oe = new ObjectExtend();
    window.extend = function () {
        return oe.extend(Array.prototype.slice.call(arguments));
    };
})(window);

